package com.utn.tp.integrador.bd;

import android.content.Context;

public class BaseDatosSingleton {
	private BaseDatos baseDatos = null;
	private static BaseDatosSingleton controllerSingleton = null;

	private BaseDatosSingleton(Context context) {
		baseDatos = new BaseDatos(context);
	}

	private static void createInstance(Context context) {
		if (controllerSingleton == null)
			controllerSingleton = new BaseDatosSingleton(context);
	}

	public static BaseDatosSingleton getInstance(Context context) {
		if (controllerSingleton == null)
			createInstance(context);

		return controllerSingleton;
	}

	public BaseDatos getBaseDatos() {
		return baseDatos;
	}
}
